package cn.seecoder.ai.dao;

import cn.seecoder.ai.model.po.FileInfo;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;


public interface FileInfoRepository extends JpaRepository<FileInfo, Integer> {
    Optional<FileInfo> findByUserIdAndFileName(Integer userId, String fileName);

    List<FileInfo> findByUserId(Integer userId);

    List<FileInfo> findByUserIdOrderByUploadTimeDesc(Integer userId);
}